//
//  CoreDataManager.h
//  LineByLine
//
//  Created by 병철 김 on 11. 10. 11..
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface CoreDataManager : NSObject {
    NSManagedObjectContext *managedObjectContext;
    NSManagedObjectModel *managedObjectModel;
    NSPersistentStoreCoordinator *persistentStoreCoordinator;
}

+ (CoreDataManager *) sharedCoreDataManager;
- (id) selectOneFrom:(NSString*)entityName where:(id)condition, ...;
- (id) insertOneInto:(NSString*)entityName values:(id)values, ...;
- (NSArray*) selectFrom:(NSString*)entityName where:(id)condition, ...;
- (void) update:(id)object values:(id) values, ...;
- (NSArray*) storeBooks;

@property (retain, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (retain, nonatomic) NSManagedObjectModel *managedObjectModel;
@property (retain, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;
@end
